package com.example.hibernate.model;

import com.example.hibernate.model.repository.Departments;
import com.example.hibernate.model.repository.Employees;

public final class DbContext {

	private static DbContext INSTANCE;

	private Employees employees;
	private Departments departments;

	private DbContext() {
	}

	public static DbContext getInstance() {
		if (INSTANCE == null) INSTANCE = new DbContext();
		return INSTANCE;
	}

	public Employees getEmployees() {
		if (employees == null) employees = new Employees();
		return employees;
	}

	public Departments getDepartments() {
		if (departments == null) departments = new Departments();
		return departments;
	}
}
